<table class="bordered" width="770">
    <thead>
    <tr>
        <th><a href="?page=category_list&action=category_new">Add New</a></th>
    </tr>
    </thead>
    <tr>
    	<?php 
			if(@$errors!=""){
				echo " <td colspan=\"3\"><span class='red'>". @$errors."</span></td>";
			}else{
				if(isset($_REQUEST['msgStatus']))
					echo " <td colspan=\"3\"><span class='red'>". $_REQUEST['msgStatus'].@$_REQUEST['one']."</span></td>";
			 }
			?>
    </tr>
</table>
<table class="bordered" width="770">
    <thead>
    <tr>       
        <th>Category</th>
        <th >Description</th>
        <th width="7%">Action</th>
    </tr>
    </thead>
    <?php
		$sql = "SELECT * FROM tbl_category";
	    $result = mysql_query($sql); 
      	while ( $row = mysql_fetch_array($result)){	
    ?>
    <tr>
      <td><?php echo $row['cat_name'] ?></td>
      <td><?php echo $row['description'] ?></td>
      <td>
        <a href="index.php?page=category_list&action=category_new&cat_id=<?php echo $row['cat_id'] ?>"><img src="images/edit.png" border="0" alt="Edit"></a> | <a href="category_verify.php?action=delete&cat_id=<?php echo $row['cat_id'] ?>" onclick="return confirm('Are you sure want to delete?');"><img src="images/delete.png" border="0" alt="delete"></a>
      </td>
    </tr>
	<?php 
		}
	?>
</table>
